import request from '@/utils/request'

export function getActivityList(params) {
  return request({
    url: '/pre/activity/query/all',
    method: 'post',
    data: params
  })
}

export function addActivity(params) {
  return request({
    url: '/pre/activity/create',
    method: 'post',
    data: params
  })
}

export function getStations(params) {
  return request({
    url: '/pre/station/query',
    method: 'post',
    data: params
  })
}

export function getProducts(params) {
  return request({
    url: '/pre/product/query',
    method: 'post',
    data: params
  })
}

export function getStationStopList(params) {
  return request({
    url: '/pre/activity/activity/station',
    method: 'post',
    data: params
  })
}

export function stopPreActivity(params) {
  return request({
    url: '/pre/activity/stop',
    method: 'post',
    data: params
  })
}

export function makeOrder(params) {
  console.log("---------")
      console.log(params)
  return request({
    url: '/pre/order/create',
    method: 'post',
    data: params
  })
}

export function getProductByActivityId(params) {
  return request({
    url: '/pre/activity/products',
    method: 'post',
    data: params
  })
}